using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.ComponentModel;

namespace mdv.wssSchemaExplorer.WSS
{
    public class wssFields
    {
        public wssFields()
        {
        }
        public wssFields(XmlNode node)
            : this()
        {
            if (node.HasChildNodes)
            {
                _fields = new List<wssField>();
                foreach (XmlNode xn in node)
                {
                    if (xn.Name == "Field")
                    {
                        wssField f = new wssField(xn);
                        _fields.Add(f);
                    }
                }
            }
        }
        #region Non-Designer Properties
        private List<wssField> _fields;
        [Browsable(false)]
        public List<wssField> Fields
        {
            get { return _fields; }
        }
        #endregion
        public override string ToString()
        {
            return "Fields";
        }
    }
}